package com.yunhe.option.service.base;

import com.yunhe.option.domain.base.AcceptanceSituation;
import com.yunhe.common.exception.ArgumentErrorException;
import com.yunhe.common.exception.ObjectNotFoundException;
import com.yunhe.common.exception.UniqueConstraintsException;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

/**
 * 验收情况类型Service
 * @desc 验收情况类型服务类定义
 * @author anmeiyi
 */
public interface AcceptanceSituationService {

    /**
     * 新增验收情况类型
     * @param acceptanceSituation 验收情况类型
     */
    @Transactional
    AcceptanceSituation createAcceptanceSituation(AcceptanceSituation acceptanceSituation)
            throws ArgumentErrorException, UniqueConstraintsException;

    /**
     * 删除验收情况类型
     * @param acceptanceSituationId 验收情况类型Id
     */
    @Transactional
    void deleteAcceptanceSituation(Long acceptanceSituationId);

    /**
     * 更新验收情况类型（更新全部字段）
     * @param acceptanceSituation 验收情况类型
     */
    @Transactional
    AcceptanceSituation updateAcceptanceSituation(AcceptanceSituation acceptanceSituation)
            throws ArgumentErrorException, UniqueConstraintsException, ObjectNotFoundException;

    /**
     * 更新验收情况类型（部分字段）
     * @param acceptanceSituationId
     * @param code
     * @param name
     * @param title
     * @param sn
     * @param activity
     * @param acceptanceTime
     */
    @Transactional
    AcceptanceSituation updateAcceptanceSituation(Long acceptanceSituationId, Long code, String name, String title, Long sn, Boolean activity, Date acceptanceTime)
            throws ArgumentErrorException, UniqueConstraintsException, ObjectNotFoundException;

    /**
     *获得全部验收情况类型对象
     */
    @Transactional
    Iterable<AcceptanceSituation> findIndustryCategories();
}
